(C++) Check for integer to enumeration casts that could result in undefined values.